package cn.tonyandmoney.baidu.asr.adapter

import cn.tonyandmoney.baidu.asr.entity.NluResult
import cn.tonyandmoney.baidu.asr.recognizer.IRecogListener
import cn.tonyandmoney.baidu.asr.recognizer.RecogResult

/**
 * Created by niantuo on 2018/2/8.
 * 接口类型
 */
open class IRecogCallback : IRecogListener {


    override fun onAsrAudio(data: ByteArray?, offset: Int, length: Int) {

    }

    override fun onAsrBegin() {

    }

    override fun onAsrEnd() {

    }

    override fun onAsrExit() {

    }


    override fun onAsrFinish(recogResult: RecogResult?) {

    }

    override fun onAsrFinishError(errorCode: Int, subErrorCode: Int, errorMessage: String?, descMessage: String?, recogResult: RecogResult?) {

    }

    /**
     * 长语音识别接收
     */
    override fun onAsrLongFinish() {

    }

    /**
     * 长语音识别，中途返回结果
     */
    override fun onAsrPartialResult(results: Array<out String>?, recogResult: RecogResult?, nluResult: NluResult?) {

    }

    /**
     * 长语音识别返回最终结果
     */
    override fun onAsrFinalResult(results: Array<out String>?, recogResult: RecogResult?, result: NluResult?) {

    }

    /**
     * 语义理解
     */
    override fun onAsrOnlineNluResult(nluResult: String?) {

    }


    override fun onAsrReady() {

    }

    override fun onAsrVolume(volumePercent: Int, volume: Int) {

    }

    override fun onOfflineLoaded() {

    }

    override fun onOfflineUnLoaded() {

    }
}